package com.loan.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.loan.common.annotation.DataColumn;
import com.loan.common.annotation.DataPermission;
import com.loan.common.core.domain.entity.SysDept;
import com.loan.common.core.mapper.BaseMapperPlus;
import com.loan.system.domain.AddressEntity;
import com.loan.system.domain.SysConfig;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author shiguang on 2022/9/5 9:32
 */
public interface AddressMapper extends BaseMapperPlus<AddressMapper, AddressEntity, AddressEntity> {

    AddressEntity selectByName(@Param("name") String name);

    AddressEntity selectByCode(@Param("code") String code);

    List<AddressEntity> selectAddressList(@Param(Constants.WRAPPER) Wrapper<AddressEntity> queryWrapper);

    /**
     * 根据父类ID查询子类最大的code值
     * @param code
     * @return
     */
    String selectMaxByParentCode(@Param("code") String code);
}
